<h1>DoAction</h1>

<p>The DoAction instruction is used to specify a sequence of actions that are 
executed when a frame is displayed.</P>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">10</td>
<td>Identifies the DoAction instruction when it is encoded. It is encoded 
with the length field as a 16-bit integer (Little-endian byte order).</td>
</tr>

<tr>
<td nowrap valign="top">length</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>The length in bytes of the body of the instruction when it is encoded. If the 
length is greater than 62 then this field is set to 0x3F and the length is 
encoded using the extendedLength field. Encoded with the type field as a 16-bit 
integer.</td>
</tr>

<tr>
<td nowrap valign="top">extendedLength</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>Optional. Contains the length in bytes of the encoded instruction if it is
greater than 62 bytes. If the length is 62 bytes or less then this field is 
omitted.</td>
</tr>

<tr>
<td nowrap valign="top">actions</td>
<td nowrap valign="top">Action[n]</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>An array of acitons that are executed by the Flash Player when the 
current frame is displayed. The actions are executed in the order they appear 
in the array.</td>
</tr>

</table>

<p>To define the actions for a given frame the DoAction instruction is added to 
a movie after the previous frame is displayed but before the next ShowFrame 
instruction that displays the 'current' frame and triggers the actions to be 
executed.</p>

<p>Only one DoAction instruction can be used to specify the actions for a given 
frame. If more than one DoAction instruction is added in a single frame only the 
actions contained in the last DoAction instruction (before the ShowFrame 
instruction) will be executed when the frame is displayed. The others will be 
ignored.</p>

<h2>History</h2>

<p>The DoAction instruction represents the DoAction tag from the Macromedia 
Flash (SWF) File Format Specification. It was introduced in Flash 1.</p>
